package com.xian;

public class OnePlueN {

	public static void main(String[] args) {
		System.out.println(plue1(100));
		System.out.println(plue2(101)  );

	}
	
	public static int plue1(int n) {
		int sum = 0;
		for(int i = 1; i<=n; i++) {
			sum += i;
		}
		return sum;
	}
	
	public static int plue2(int n) {
		int sum = 0;
		sum = (1+n) * n / 2;
		return sum;
	}

}
